<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <title></title>
    <link rel="stylesheet" href="../css/common.css"/>
    <link rel="stylesheet" href="../css/preferential_activities.css"/>
</head>
<body>
<div id="header">
    <span class="back"><a href="javascript:;window.history.go(-1)">返回</a></span>
    <p>领取优惠劵</p>
</div>
<div class="top">
    <p>优惠分类 <span class="up"></span></p>
</div>
<div id="main" style="margin-bottom: 28px">
    <div class="load"><img src="../imgs/loading.gif" alt=""/></div>
</div>
<div class="bot_loading" style="bottom: 0">加载中...</div>
<script id="list" type="text/html">
    {{each data value}}
    <div class="list">
            <div class="left"><img src="../imgs/vr.png" alt=""/></div>
            <ul class="center">
                <li>{{value.title}}</li>
                {{if value.type==1}}
                <li class="red"><span>{{value.discount}}</span> 折</li>
                {{else if value.type==2}}
                <li class="red"><span>{{value.cash}}</span> 元</li>
                {{/if}}
                <li>有效期至<i>{{value.end_time}}</i></li>
            </ul>
            <ul class="right">
                {{if value.has==1}}
                <li class="color">已领取</li>
                {{else if value.rest_num<=0}}
                <li class="color">领取</li>
                {{else}}
                <li><a  class="get" f_id="{{value.id}}" href="get_success.html">领取</a></li>
                {{/if}}
                <li class="look"><a href="erweima.html">查看详情</a></li>
                <li>剩余 <i>{{value.rest_num}}</i>张</li>
             </ul>
    </div>
    {{/each}}
</script>
<script src="http://cdn.static.runoob.com/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="../js/jquery.cookie.js"></script>
<script src="../js/config.js"></script>
<script src="../js/template.js"></script>
<script src="../js/ajax.js/"></script>
<script src="../js/getyouhuijuan.js"></script>
</body>
</html>